﻿using EMall.Domain;
using System.Linq.Expressions;

namespace EMall.Query
{
    public interface IQueryService
    {
        IQueryable<TEntity> GetQueryable<TEntity>() where TEntity : class; 
        Task<TEntity> GetAsync<TEntity, TKey>(TKey id) where TEntity : class, IEntity<TKey>;
        Task<List<TEntity>> GetListAsync<TEntity>() where TEntity : class;
        Task<List<TEntity>> GetListAsync<TEntity>(Expression<Func<TEntity, bool>> predicate) where TEntity : class;
    }
}